import java.util.Scanner;
public class Parity {
    public static void main(String[] args){
        Scanner myObj = new Scanner(System.in);
        String a;
        int count = 0;
        System.out.println("Enter string:");
        a = myObj.nextLine();
        for(int i = 0;i < a.length();i ++){
            if(a.charAt(i)!=' '){
                count++;
            }
        }
        //System.out.println(a.length());
        System.out.println(count);
        myObj.close();
    }
}
